MPT.addAction("cardList", function(_elm) {

    //当前护照提示
    var ctip_jQ = $(".current", _elm);
    //箭头
    var arrow_jQ = $(".arrow", _elm);
    //下一个护照等级
    var nextGrade_jQ = $(".e_nextgradenum", _elm);


    Tab.switchProfile();

    //获取大区信息
    SiteUtil.getServerZone(function(_areaList) {
        //获取服信息
        SiteUtil.getServerGroup(function(_groupList) {
            //获取省份信息
            $.getScript(MPT.Config.sta_js_lib_http + '/province_city_map.js', function() {
                $.ajax({

                    type: 'GET',
                    url: MPT.Config['interface']['findPassport'],
                    dataType: 'json',
                    success: function(_resp) {
                        var result = _resp.result;
                        var data = _resp.data;
                        var passportInfo = {};
                        if (data) {
                            //拼装护照数据
                            passportInfo.area = _areaList[data.area] || ''; //大区
                            passportInfo.group = _groupList[data.area + data.group] || ''; //组
                            passportInfo.sex = data.sex; //性别
                            passportInfo.liveCity = province_city_map['city'][data.liveCityId].name || ''; //现住
                            passportInfo.homeCity = province_city_map['city'][data.hometownCityId].name || ''; //家乡
                            passportInfo.signature = data.signature || ''; //签名
                            passportInfo.grade = Util.transformGradeToIcon(data.grade) || ''; //等级所对应的星星
                            passportInfo.nickname = data.nickname || ''; //昵称
                            passportInfo.cpgrade = data.cpgrade || 0; //当前护照等级
                            passportInfo.npgrade = data.npgrade || 0; //下一个护照等级
                            passportInfo.ngrade = data.ngrade || 0; //下一个护照等级所对应的社区等级
                            passportInfo.friendCount = data.friendCount; //好友数
                            passportInfo.fansCount = data.fansCount; //粉丝数
                            passportInfo.face = Util.avatarPath(data.userId); //头像
                            //达到多少级才改变护照颜色
                            nextGrade_jQ.html(passportInfo.ngrade);
                            //获取护照等级颜色
                            var passportColor = SiteUtil.getCardColor();
                            //获取当前护照模版,在箭头前面添加
                            var passport = MPT.getTmpl('passport', passportInfo);
                            var cpassport_jQ = $(passport);
                            cpassport_jQ.removeClass().addClass(passportColor[passportInfo.cpgrade || 1]); //改变模版颜色
                            arrow_jQ.before(cpassport_jQ);
                            //获取下一级护照模版,在箭头后面添加
                            passportInfo.grade = Util.transformGradeToIcon(data.ngrade); //改变等级的星级显示
                            var nextPassport = MPT.getTmpl('passport', passportInfo);
                            var npassport_jQ = $(nextPassport);
                            npassport_jQ.removeClass().addClass(passportColor[passportInfo.npgrade || 10]);
                            arrow_jQ.after(npassport_jQ);
                            //如果护照等级达到10级的话,则隐藏箭头与下一等级
                            if (passportInfo.cpgrade == 10) {
                                npassport_jQ.hide();
                                arrow_jQ.hide();
                                ctip_jQ.last().html('&nbsp;');
                            }

                        }

                    }
                })

            })

        })
    })

});